<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>首页</title>
    <jsp:include page="../../include/resource.jsp"/>
</head>
<body>
<jsp:include page="../../include/admin-header.jsp"/>
<div class="container">
    <div class="table-responsive">
        <table class="table">
            <thead>
            <tr>
                <th>编号</th>
                <th>用户</th>
                <th>标题</th>
                <th>描述</th>
                <th>添加时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${pageInfo.list}" var="item">
                <tr class="success">
                    <td>${item.id}</td>
                    <td>${item.userName}</td>
                    <td>${item.name}</td>
                    <td>${item.descript}</td>
                    <td><fmt:formatDate value="${item.addtime}" pattern="yyyy-MM-dd HH:mm:ss"/> </td>
                    <td>
                        <a href="/admin/news/del/${item.id}.do" class="btn btn-xs btn-danger">删除</a>
                        <a href="/detail/${item.id}.do" class="btn btn-xs btn-success">查看</a>
                    </td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
    <jsp:include page="../../include/table-page.jsp"/>
</div>
</body>
</html>
